from sqlalchemy import Column, BigInteger, PrimaryKeyConstraint
from base import Base

class SysRoleDept(Base):
    __tablename__ = 'sys_role_depts'

    role_id = Column(BigInteger, primary_key=True, nullable=False, comment='角色ID')
    dept_id = Column(BigInteger, primary_key=True, nullable=False, comment='部门ID')

    __table_args__ = (
        PrimaryKeyConstraint('role_id', 'dept_id', name='pk_sys_role_dept'),
    )

    def __repr__(self):
        return f"<SysRoleDept(role_id={self.role_id}, dept_id={self.dept_id})>"
